package com.codeoss.module.account.pagebean;

import java.math.BigDecimal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.codeoss.framework.view.pagebean.mobile.MFormViewPageBean;
import com.codeoss.module.account.service.IAccountInvoiceService;

@Service("mAccountInvoiceFormViewPageBean")
public class MAccountInvoiceFormViewPageBean extends MFormViewPageBean{
	@Autowired
	private IAccountInvoiceService accountInvoiceService;
	
	public BigDecimal calculateAmountTotal() {
		Long keyValue=(Long)getCurrentKeyValue();
		return accountInvoiceService.calculateAmountTotal(keyValue);
	}
	
	public BigDecimal calculateAmountUntaxed() {
		Long keyValue=(Long)getCurrentKeyValue();
		return accountInvoiceService.calculateAmountUntaxed(keyValue);
	}
	
	public BigDecimal calculateAmountTax() {
		Long keyValue=(Long)getCurrentKeyValue();
		return accountInvoiceService.calculateAmountTax(keyValue);
	}
}
